def insertion_search(array,target,left,right):
    if left > right:
        return None
    ratio=(target-array[left])/(array[right]-array[left])
    mid=int((left+right)*ratio)
    if array[mid] == target:
        return mid
    if array[mid] < target:
        return insertion_search(array,target,mid+1,right)
    if array[mid] > target:
        return insertion_search(array,target,left,mid-1)

def interpolation_search(array,target):
    return insertion_search(array,target,0,len(array)-1)

array=[1,2,3,4,5,6,7,8,9,10]
print(array)
print(interpolation_search(array,2))